package com.example.demo.test.lock;

import java.util.*;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
import java.util.stream.Collectors;

/**
 * @author 贺超
 * @date 2021/2/20 9:27
 */
public class LockUtil {

    /*
        public static void main(String[] args) {
            Lock lock = new ReentrantLock();

            lock.lock();
            lock.unlock();

          *//*  Map<String, String> map = new HashMap<>();
        map.put("mote", "11");
        map.put("num", "11");
        List<Map<String, String>> resultMap = new ArrayList<>();

        List<Map<String, String>> list = new ArrayList<>();
        Map<String,String> map1=new HashMap();
        map1.put("mote","11");
        map1.put("num","122");
        Map<String,String> map2=new HashMap();
        map2.put("mote","111");
        map2.put("num","123");

        list.add(map1);
        list.add(map2);

        Map<String, String> collect = list.stream().collect(Collectors.toMap(s -> s.get("mote"), s -> s.get("num")));
        System.out.println(collect);

*//*





        List<Map<String,String>> maps=new ArrayList<>();
        List<Map<String,String>>  resultMap=new LinkedList<>();
        for (int i = 0; i <maps.size() ; i++) {
            Map<String, String> map = maps.get(i);
            //获取架次
            String mode = map.get("mode").toString();
            List<Map<String,String>> addList=new ArrayList<>();
            maps.forEach(map1->{
                if (map1.get("mode").toString().equals(mode)){
                     addList.add(map1);
                }
            });
            Map<String, String> collect = addList.stream().collect(Collectors.toMap(m -> m.get(""), m -> m.get("")));
            //添加架次和
            collect.put("","");

            //返回前端
            resultMap.add(collect);


        }




        Map map=new HashMap();

        Map hashtable=new Hashtable();

    }
    */
    public static void main(String[] args) {
        System.out.println(12%16);
    }

}
